<template>
	<view>
		<u-navbar title="帮助中心" autoBack placeholder :border="false"></u-navbar>
		<view style="padding: 32rpx;background-color: #fff;">
			<u-empty v-if="!loading && list.length===0" text="暂无排行" mode="data"
				icon="http://cdn.uviewui.com/uview/empty/data.png">
			</u-empty>
			<template v-if="list.length>0">
				<u-collapse border accordion>
					<u-collapse-item :title="`${index+1}. ${item.title}`" :name="index" v-for="(item, index) in list"
						:key="index">
						<text class="u-collapse-content">{{item.value}}</text>
					</u-collapse-item>
				</u-collapse>
			</template>
		</view>
	</view>
</template>

<script>
	import {
		propertyPointQuestion
	} from '@/api/home.js';
	export default {
		data() {
			return {
				list: [],
				loading: true
			}
		},
		onLoad() {
			// this.loading = true
			this.$cuLoading('加载中...').then(() => {
				propertyPointQuestion().then(res => {
					this.list = res.result;
				}).finally(() => {
					this.loading = false;
					uni.hideLoading();
				})
			})
		}
	}
</script>

<style>
	page {
		background-color: #f5f5f5;
	}
</style>

<style lang="scss" scoped>
	.rank-item {
		display: flex;
		align-items: center;
		margin-bottom: 32rpx;

		.rank-item-r {
			padding-left: 30rpx;
			flex: 1;
			display: flex;
			align-items: center;
			justify-content: space-between;

			.rank-item-r-1 {
				display: flex;
				align-items: center;
				justify-content: space-between;
			}

			.rank-points {
				color: #ff9d4f;
			}

			.rank-points1 {
				color: #000;
			}
		}
	}
</style>
